﻿using System;
using agsXMPP.protocol.client;
using agsXMPP.protocol.iq.roster;
using JBotAPI.Logs;
using ScriptsAPI;
using agsXMPP;

namespace JClient {
	public partial class ConnectionProvider {
		public event agsXMPP.ObjectHandler OnAgentEnd;
		private void Client_OnAgentEnd(object sender) {
			if (this.OnAgentEnd != null)
				OnAgentEnd.Invoke(sender);
		}
		public event XmppClientConnection.AgentHandler OnAgentItem;
		private void Client_OnAgentItem(object sender, agsXMPP.protocol.iq.agent.Agent agent) {
			if (this.OnAgentItem != null)
				OnAgentItem.Invoke(sender, agent);
		}
		public event ObjectHandler OnAgentStart;
		private void Client_OnAgentStart(object sender) {
			if (this.OnAgentStart != null)
				OnAgentStart.Invoke(sender);
		}
		public event XmppElementHandler OnAuthError;
		private void Client_OnAuthError(object sender, agsXMPP.Xml.Dom.Element e) {
			if (this.OnAuthError != null)
				OnAuthError.Invoke(sender, e);
		}
		public event ObjectHandler OnBinded;
		private void Client_OnBinded(object sender) {
			if (this.OnBinded != null)
				OnBinded.Invoke(sender);
		}
		public event ObjectHandler OnClose;
		private void Client_OnClose(object sender) {
			if (this.OnClose != null)
				OnClose.Invoke(sender);
		}
		public event ErrorHandler OnError;
		private void Client_OnError(object sender, System.Exception ex) {
			if (this.OnError != null)
				OnError.Invoke(sender, ex);
		}
		public event IqHandler OnIq;
		private void Client_OnIq(object sender, agsXMPP.protocol.client.IQ iq) {
			if (this.OnIq != null)
				OnIq.Invoke(sender, iq);
		}
		public event ObjectHandler OnLogin;
		private void Client_OnLogin(object sender) {
			if (this.OnLogin != null)
				OnLogin.Invoke(sender);
		}
		public event MessageHandler OnMessage;
		private void Client_OnMessage(object sender, agsXMPP.protocol.client.Message msg) {
			if (this.OnMessage != null)
				OnMessage.Invoke(sender, msg);
		}
		public event ObjectHandler OnPasswordChanged;
		private void Client_OnPasswordChanged(object sender) {
			if (this.OnPasswordChanged != null)
				OnPasswordChanged.Invoke(sender);
		}
		public event PresenceHandler OnPresence;
		private void Client_OnPresence(object sender, Presence pres) {
			if (this.OnPresence != null)
				OnPresence.Invoke(sender, pres);
		}
		public event agsXMPP.net.BaseSocket.OnSocketDataHandler OnReadSocketData;
		private void Client_OnReadSocketData(object sender, byte[ ] data, int count) {
			if (this.OnReadSocketData != null)
				OnReadSocketData.Invoke(sender, data, count);
		}
		public event XmlHandler OnReadXml;
		private void Client_OnReadXml(object sender, string xml) {
			if (this.OnReadXml != null)
				OnReadXml.Invoke(sender, xml);
		}
		public event ObjectHandler OnRegistered;
		private void Client_OnRegistered(object sender) {
			if (this.OnRegistered != null)
				OnRegistered.Invoke(sender);
		}
		public event XmppElementHandler OnRegisterError;
		private void Client_OnRegisterError(object sender, agsXMPP.Xml.Dom.Element e) {
			if (this.OnRegisterError != null)
				OnRegisterError.Invoke(sender, e);
		}
		public event agsXMPP.protocol.iq.register.RegisterEventHandler OnRegisterInformation;
		private void Client_OnRegisterInformation(object sender, agsXMPP.protocol.iq.register.RegisterEventArgs args) {
			if (this.OnRegisterInformation != null)
				OnRegisterInformation.Invoke(sender, args);
		}
		public event ObjectHandler OnRosterEnd;
		private void Client_OnRosterEnd(object sender) {
			if (this.OnRosterEnd != null)
				OnRosterEnd.Invoke(sender);
		}
		public event XmppClientConnection.RosterHandler OnRosterItem;
		private void Client_OnRosterItem(object sender, agsXMPP.protocol.iq.roster.RosterItem item) {
			if (this.OnRosterItem != null)
				OnRosterItem.Invoke(sender, item);
		}
		public event ObjectHandler OnRosterStart;
		private void Client_OnRosterStart(object sender) {
			if (this.OnRosterStart != null)
				OnRosterStart.Invoke(sender);
		}
		public event ObjectHandler OnSaslEnd;
		private void Client_OnSaslEnd(object sender) {
			if (this.OnSaslEnd != null)
				OnSaslEnd.Invoke(sender);
		}
		public event agsXMPP.sasl.SaslEventHandler OnSaslStart;
		private void Client_OnSaslStart(object sender, agsXMPP.sasl.SaslEventArgs args) {
			if (this.OnSaslStart != null)
				OnSaslStart.Invoke(sender, args);
		}
		public event ErrorHandler OnSocketError;
		private void Client_OnSocketError(object sender, System.Exception ex) {
			if (this.OnSocketError != null)
				OnSocketError.Invoke(sender, ex);
		}
		public event XmppElementHandler OnStreamError;
		private void Client_OnStreamError(object sender, agsXMPP.Xml.Dom.Element e) {
			if (this.OnStreamError != null)
				OnStreamError.Invoke(sender, e);
		}
		public event agsXMPP.net.BaseSocket.OnSocketDataHandler OnWriteSocketData;
		private void Client_OnWriteSocketData(object sender, byte[ ] data, int count) {
			if (this.OnWriteSocketData != null)
				OnWriteSocketData.Invoke(sender, data, count);
		}
		public event XmlHandler OnWriteXml;
		private void Client_OnWriteXml(object sender, string xml) {
			if (this.OnWriteXml != null)
				OnWriteXml.Invoke(sender, xml);
		}
		public event XmppConnectionStateHandler OnXmppConnectionStateChanged;
		private void Client_OnXmppConnectionStateChanged(object sender, agsXMPP.XmppConnectionState state) {
			if (this.OnXmppConnectionStateChanged != null)
				OnXmppConnectionStateChanged.Invoke(sender, state);
		}
		//public event XmppElementHandler OnXmppError;
		/*private void Client_OnXmppError(object sender, agsXMPP.Xml.Dom.Element e) {
			if (this.OnXmppError != null)
				OnXmppError.Invoke(sender, e);
		}*/
	}
}